package pers.lance.exam.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pers.lance.exam.dao.BaseDao;
import pers.lance.exam.pojo.Base;
import pers.lance.exam.service.BaseService;

import javax.transaction.Transactional;
import java.util.List;

/**
 * @ Author     ：LILA3
 * @ Date       ：Created in 1:58 PM 7/31/2018
 */
@Service
public class BaseServiceImpl implements BaseService {
    @Autowired
    BaseDao baseDao;

//    @Transactional
    public Base addBase(Base base) {
        return baseDao.add(base);
    }

//    @Transactional
    public Base deleteBase(Base base) {
        return baseDao.delete(base);
    }

    public Base getBaseById(Base base) {
        return baseDao.findById(base);
    }

    public List<Base> listBase() {
        return baseDao.findAll();
    }
}
